import 'package:shared_preferences/shared_preferences.dart';
import 'package:event_bus/event_bus.dart';

import 'http/Api.dart';

class AppManager {
  static const USER_NAME = "user_name";
  static const USER_PASSWORD = "user_pwd";
  static const LOGIN_STATE = "login_state";
  static SharedPreferences? prefs;
  static EventBus eventBus = EventBus();
  static bool isLogin = false;

  static initApp() async {
    await Api.init();
    prefs = await SharedPreferences.getInstance();
    isLogin = prefs?.getBool(LOGIN_STATE) ?? false;
  }
}
